package com.nhjf.model.finetTalk;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.system.User;

@SuppressWarnings("serial")
@Entity
@Table(name = "finetTalkComment")
public class FinetTalkComment extends BaseModel{

	/**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	 * 精讲评论
	 */
	@Column(name = "comment")
	private String comment;
	/**
	 * 精讲id
	 */
	@Column(name = "finetTalkId")
	private Long finetTalkId;
	/**
	 * 评论人类型1老师2学生
	 */
	@Column(name = "commentUserType")
	private Integer commentUserType;
	/**
	 * 评论人，关联user
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "commentUser")
	private User user;
	/**
	 * 评论类型1是文字评论2是语音评论
	 */
	@Column(name = "commentType")
	private Integer commentType;
	/**
	 * 评论时间
	 */
	@Column(name = "commentTime")
	private Date commentTime;
	
	@Transient
	private String avatar;
	@Transient
	private String nickname;
	@Transient
	private String commentTimeString;
	
	public String getCommentTimeString() {
		return commentTimeString;
	}
	public void setCommentTimeString(String commentTimeString) {
		this.commentTimeString = commentTimeString;
	}
	public String getAvatar() {
		return avatar;
	}
	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}


	public Long getFinetTalkId() {
		return finetTalkId;
	}
	public void setFinetTalkId(Long finetTalkId) {
		this.finetTalkId = finetTalkId;
	}
	public Integer getCommentUserType() {
		return commentUserType;
	}
	public void setCommentUserType(Integer commentUserType) {
		this.commentUserType = commentUserType;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Integer getCommentType() {
		return commentType;
	}
	public void setCommentType(Integer commentType) {
		this.commentType = commentType;
	}
	public Date getCommentTime() {
		return commentTime;
	}
	public void setCommentTime(Date commentTime) {
		this.commentTime = commentTime;
	}


}
